set hive.exec.dynamic.partition=true;--动态分区
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.max.dynamic.partitions=10;
set hive.exec.max.dynamic.partitions.pernode=10;

insert overwrite table jms_dwd.dwd_oms_waybill_extend_base_dt partition (dt)
select
id
,waybill_no
,package_name
,package_code
,input_time
,collection_package_type
,is_privacy
,fourth_segment_code
,transport_type_code
,destination_source_code
,pick_parent_network_code
,pick_parent_network_name
,settle_customer_code
,settle_customer_name
,receiver_privacy_phone
,self_vip
,customer_label
,on_demand
,marketing_activity_type_name
,marketing_activity_type_code
,fourth_address_id
,fourth_address_name
,date_format(input_time,'yyyy-MM-dd') as dt
from  jms_ods.oms_waybill_extend
where dt = '{{ execution_date | cst_ds }}'
distribute by dt ,pmod(hash(rand()),12)
;